https://glot.io/snippets/gffu0a3jxu/raw/birchtree.lua